package com.bodu.core.entity.result;

/**
 * 返回状态值
 *
 * @author gaoya
 */
public enum RStateEnum {
    /**
     * 成功
     */
    REQUEST_ERROR(400, "错误请求！"),
    NO_AUTH(401, "未授权，请重新登录!"),
    ACCESS_DENIED(403, "拒绝访问!"),
    NO_FOUND_PAGE(404, "请求错误,未找到该资源!"),
    METHOD_DENIED(405, "请求方法未允许!"),
    REQUEST_TIMEOUT(408, "请求超时!"),
    SERVICE_ERROR(500, "服务器端出错!"),
    NETWORK_NOT_IMPLEMENTED(501, "网络未实现!"),
    NETWORK_ERROR(502, "网络错误!"),
    NETWORK_NOT_USE(503, "服务不可!"),
    NETWORK_TIMEOUT(504, "网络超时"),
    HTTP_NOT_SUPPORTED(505, "http版本不支持该请求"),
    SUCCESS(200, "请求成功！");

    RStateEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    private final Integer code;
    private final String message;
}
